The present invention relates to a method and apparatus for creating and editing machine control sequences via a tree-based graphical user interface (GUI) system, which eliminates the problems associated with using text-based scripts to create or edit machine control sequences.
In backup storage systems, such as those used for large servers, robotics are often employed to move tapes to and from drives in order to store backup data from the servers on the tapes. These backup storage systems are tested by issuing various machine control sequences that cause the robotics and drives to perform various operations and measuring the results. Currently, text-based scripts are used to create the machine control sequences that are used to perform these operations. In order to modify the machine control sequences, the text-based scripts must be modified. Both creating and modifying text-based scripts can be extremely difficult and time-consuming tasks due to the cryptic nature of text-based scripts.
An example of a portion of a text-based script written in k shell is shown in FIG. 1. This particular script is used to test the functionality of a particular device and the device driver. These types of scripts are normally created using a word editor, and are written in a particular language that can be interpreted by an interpreter designed to interpret scripts written in that language. The box 2 is a comment box that is intended to provide certain information about the script, such as details regarding the test it performs and the language in which it was written (e.g., k shell, c shell and b shell), for example. The lines 3, 4 and 5 perform exports on certain environment variables that will be used by the script in performing the test. The portion 6 of the script removes a particular temporary test file if one already exists and the portion 7 then creates a temporary test file that contains certain environment information that needs to be utilized by the script to perform the test.
Although the comment box 2 and the comment lines (i.e., the lines beginning with xe2x80x9c#xe2x80x9d) provide information about the script and the various functions it performs, ascertaining the overall purpose of the script and the functions associated with certain lines of the script are still difficult tasks. Often times, the person charged with the task of interpreting and understanding the script is not the same person who wrote the script. In this case, these tasks may be extremely challenging, requiring both that the person understand the language in which the script was written and have skill in writing scripts written in that language. Furthermore, scripts often call other scripts, which makes these tasks even more difficult, because the person may need to also look at and understand the script that is called. Nevertheless, it is common for persons other than the designer of a script to be challenged with the tasks of reading and understanding the script in order to use it, debug it, or modify it.
Accordingly, a need exists for way to create and/or modify machine control sequences that overcomes these shortcomings.
The present invention provides a tree-based graphical user interface (GUI) that enables command sequences to be easily created and edited by a user, thereby eliminating the need for the user to deal with text-based scripts and the associated difficulties. The GUI simultaneously displays a tree structure and a list. The tree structure is comprised of a sequence, which is the root node of the tree structure, at least one step branching off of the sequence node, at least one device branching off of each step node, and at least one command branching off of each device node. The list displays items that can be added to the tree structure. When a step node of the tree structure is selected, the list displays devices that can be added to the step node. When a device node is selected, the list displays commands that can be added to the step. Items can be easily added to or removed from a selected node of the tree structure. Therefore, the steps, devices and commands that comprise the machine control sequences can be easily created and edited without requiring that the user understand the underlying code.
In accordance with the preferred embodiment, if a sequence node is selected by the user by, for example, placing the cursor on that node and clicking the left mouse button, the list will display a list of steps. A step can be added to the tree structure by highlighting the desired step in the list and then by selecting an xe2x80x9cADDxe2x80x9d button. In order to remove a step from the tree structure, the step is highlighted and then a xe2x80x9cREMOVExe2x80x9d button is selected. This action will cause the selected step and any devices branching off of the step and their associated commands to be removed from the tree structure. If a step node is selected, the list will display a list of devices that can be added to the step in the tree structure. A device can be added by selecting the aforementioned xe2x80x9cADDxe2x80x9d button. Devices can be deleted from a step by highlighting the device to be removed and by selecting the aforementioned xe2x80x9cREMOVExe2x80x9d button. If a device node is selected in the tree structure, a valid set of commands that can be used with the device will be listed in the list. Commands can then be added to the tree structure by using the xe2x80x9cADDxe2x80x9d button in the aforementioned manner. Commands can be removed from the tree structure by using the xe2x80x9cREMOVExe2x80x9d button in the aforementioned manner.
The steps, devices and commands in the tree structure can also be easily configured via the GUI. In accordance with the preferred embodiment, a step, device or command can be configured by selecting the corresponding node in the tree structure and by right-clicking the mouse button, which will cause a corresponding screen to be displayed. The user then selects the appropriate options in the screen to configure the step, device or command.
Preferably, the GUI code, its associated user interaction handling code and the commands that make up the control sequences are written in the JAVA(trademark) programming language so that the invention is platform independent and thus is portable over various types of computing devices, including, for example, UNIX workstations, personal computers (PCs), Macintosh computers, handheld computing devices, appliances, etc. Other programming languages can also be used for these purpose. Preferably, an object-oriented language is used for the GUI code, its associated user interaction handling code and the commands that make up the control sequences.